<%--
  Created by IntelliJ IDEA.
  User: MGL
  Date: 2020/10/16
  Time: 19:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>修改员工</title>
    <link rel="stylesheet" type="text/css" href="../../css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../../skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../lib/My97DatePicker/4.8/skin/WdatePicker.css" />
    <script type="text/javascript" src="../../lib/html5shiv.js"></script>
    <script type="text/javascript" src="../../lib/respond.min.js"></script>
    <script type="text/javascript" src="../../lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="../../lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="../../js/H-ui.min.js"></script>
    <script type="text/javascript" src="../../js/H-ui.admin.js"></script>
    <script type="text/javascript" src="../../lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript" src="../../lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="../../lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="../../lib/jquery.validation/1.14.0/messages_zh.js"></script>
</head>
<body>
<article class="page-container">
    <form class="form form-horizontal" id="form-admin-add" action="${pageContext.request.contextPath}/getEmp/getUpdateEmp" method="post" >
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>用户名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="hidden" name="id" value="${emp.id}">
                <input type="text" class="input-text" value="${emp.userName}" placeholder="" id="userName" name="userName" datatype="*">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>密码：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="password" class="input-text" autocomplete="off"  value="" placeholder="确认新密码" id="password" name="password" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>性别：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                <div class="radio-box">
                    <input name="sex-1" type="radio" id="sex-1" value="1" >
                    <label for="sex-1">男</label>
                </div>
                <div class="radio-box">
                    <input type="radio" id="sex-0" name="sex-0" value="0" >
                    <label for="sex-0">女</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>部门：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" value="${emp.departmentId}" class="input-text" name="departmentId" id="department_id" datatype="n">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>生日：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text Wdate" value="<fmt:formatDate value="${emp.birthday}" pattern="yyyy-MM-dd"/>" name="birthday" id="birthday" onclick="WdatePicker()">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>手机：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${emp.mobile}" id="phone" name="mobile" datatype="m">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>邮箱：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" name="email" id="email" datatype="e" value="${emp.email}">
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>
<script>
    var sexid=${emp.sex};
    if (sexid==1){
        $("#sex-1").prop("checked",true)
    }else {
        $("#sex-0").prop("checked",true)
    }
</script>
</body>
</html>
